import { htmlLiveReload } from '@gtramontina.com/bun-html-live-reload';
import impl from './src';

const server = Bun.serve(
  htmlLiveReload({
    port: 8880,
    development: true,
    fetch: (req) => {
      return impl.fetch(
        // @ts-ignore
        req,
        { CDN_BASE_URL: 'https://cdn.jsdelivr.net/npm/' },
        {},
      );
    },
  }),
);

console.log(`server running on ${server.url}`);
